package cn.duli.myvideo.service.Impl;

import cn.duli.myvideo.mapper.MovieCommentMapper;
import cn.duli.myvideo.pojo.MovieComment;
import cn.duli.myvideo.service.MovieCommentService;
import com.github.pagehelper.Page;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class MovieCommentServiceImpl implements MovieCommentService {

    @Resource
    private MovieCommentMapper movieCommentMapper;

    @Override
    public Page<MovieComment> findAll() {
        return movieCommentMapper.findAll();
    }

    @Override
    public List<MovieComment> findByUserId(Integer uId) {
        return movieCommentMapper.findByUserId(uId);
    }

    @Override
    public List<MovieComment> findById(Integer mId) {
        return movieCommentMapper.findById(mId);
    }

    @Override
    public void save(MovieComment movieComment) {
        movieCommentMapper.save(movieComment);
    }

    @Override
    public void deleteById(Integer mcId) {
        movieCommentMapper.deleteById(mcId);
    }
}
